<template>
	<view class="content">
		<self-navbar title='个人信息'></self-navbar>
		<global-notify></global-notify>
		<view class="infoCells">
			<u-cell-group title="个人信息:">
				<u-cell icon="account-fill" title="姓名" hover-class="none" :value="userInfo.name" :arrow="false"></u-cell>
				<u-cell icon="phone-fill" title="手机" hover-class="none" :value="userInfo.telePhone" :arrow="false"></u-cell>
				<u-cell icon="email-fill" title="邮箱" hover-class="none" :value="userInfo.email" :arrow="false"></u-cell>
				<view v-if="isLawyer">
					<u-cell icon="coupon-fill" title="执业证号" hover-class="none" :value="lawFirmInfo.licenseNumber"
						:arrow="false"></u-cell>
					<u-cell icon="calendar-fill" title="执业时间" hover-class="none" :value="lawFirmInfo.startWorkDate"
						:arrow="false"></u-cell>
					<u-cell icon="pushpin-fill" title="个人简介" :label="lawFirmInfo.remark"></u-cell>
				</view>
			</u-cell-group>
		</view>

		<view class="infoCells" v-if="isLawyer">
			<u-cell-group title="所属律所:">
				<u-cell icon="home-fill" title="律所名称" hover-class="none" :value="lawFirmInfo.lawFirmName"
					:arrow="false"></u-cell>
				<u-cell icon="calendar-fill" title="注册时间" hover-class="none" :value="lawFirmInfo.establishDate"
					:arrow="false"></u-cell>
				<u-cell icon="map-fill" title="律所地址" hover-class="none" :value="lawFirmInfo.address ||'--'"
					:arrow="false"></u-cell>
			</u-cell-group>
		</view>
	</view>
</template>
<script>
	import {
		toast,
		clearStorageSync,
		setStorageSync,
		getStorageSync,
		useRouter
	} from '@/utils/utils.js'
	export default {
		data() {
			return {
				userInfo: getStorageSync('userInfo') || {},
				lawyerInfo: getStorageSync('lawyerInfo') || {},
				lawFirmInfo: getStorageSync('lawFirmInfo') || {}
			}
		},
		computed: {
			isLawyer: function() {
				return Object.keys(this.lawyerInfo).length > 0
			}
		},
		onLoad(op) {
			//this.id  = op.id
		},
		onShow() {}
	}
</script>